package com.ljk;

import com.ljk.config.CtyunProperty;
import com.ljk.util.CtyunUtil;
import lombok.extern.slf4j.Slf4j;
import picocli.CommandLine;

@Slf4j
public class OptionCtyunMain {
    public static void main(String[] args) {
        CtyunProperty property = new CtyunProperty();
        CommandLine commandLine = new CommandLine(property);
        int execute = commandLine.execute(args);
        if (execute != 0) {
            if (execute == -1) {
            } else if (execute == 2) {
                log.error("参数缺失");
            } else {
                log.debug("退出码[{}]", execute);
            }
            System.exit(execute);
        }
        log.info("程序启动");
        CtyunUtil.uploadFile(property);
        log.info("运行结束");

    }

}
